//
//  AsiaTableViewCell.m
//  艾听歌
//
//  Created by dllo on 16/5/16.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "AsiaTableViewCell.h"

@implementation AsiaTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imageV = [[UIImageView alloc] init];

        [self.contentView addSubview:self.imageV];
        
        self.titleLabel = [[UILabel alloc] init];

        [self.contentView addSubview:self.titleLabel];
        
        self.intrLabel = [[UILabel alloc] init];

        [self.contentView addSubview:self.intrLabel];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.imageV.frame = CGRectMake(10, 10, WIDTH - 275, 60);
    self.titleLabel.frame = CGRectMake(self.contentView.frame.size.width - 250, 15, WIDTH - 140, 25);
    self.intrLabel.frame = CGRectMake(self.contentView.frame.size.width - 250, 45, WIDTH - 140, 20);
}
- (void)setNewMusicModel:(MusicSmallModel *)NewMusicModel
{
    _NewMusicModel = NewMusicModel;
        
    self.titleLabel.text = _NewMusicModel.name;
    self.intrLabel.text = _NewMusicModel.desc;
    self.intrLabel.font = [UIFont systemFontOfSize:14];
    
    [self.imageV sd_setImageWithURL:[NSURL URLWithString:_NewMusicModel.picUrl] placeholderImage:[UIImage imageNamed:@"hold.png"]];
   
}







- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
